package artist.graphic.cn.UI;


import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.RelativeLayout;
import android.widget.Toast;

import artist.graphic.cn.R;

public class UserActivity extends AppCompatActivity implements View.OnClickListener {

    boolean isNightMode=false;
    RelativeLayout el_hearing_enhancement,el_message,el_celve, el_training_camp, el_collect, el_discount, ll_calendar, el_about_us;
    CheckBox cb_night_mode;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.frag_personal_accounts);

        el_hearing_enhancement = (RelativeLayout) findViewById(R.id.el_hearing_enhancement);
        el_hearing_enhancement.setOnClickListener(this);
        el_message = (RelativeLayout) findViewById(R.id.el_message);
        el_message.setOnClickListener(this);
        el_celve = (RelativeLayout) findViewById(R.id.el_celve);
        el_celve.setOnClickListener(this);
        el_training_camp = (RelativeLayout) findViewById(R.id.el_training_camp);
        el_training_camp.setOnClickListener(this);
        el_collect = (RelativeLayout) findViewById(R.id.el_collect);
        el_collect.setOnClickListener(this);
        el_discount = (RelativeLayout) findViewById(R.id.el_discount);
        el_discount.setOnClickListener(this);
        ll_calendar = (RelativeLayout) findViewById(R.id.ll_calendar);
        ll_calendar.setOnClickListener(this);
        el_about_us = (RelativeLayout) findViewById(R.id.el_about_us);
        el_about_us.setOnClickListener(this);


        cb_night_mode= (CheckBox) findViewById(R.id.cb_night_mode);

        cb_night_mode.setChecked(isNightMode);
        cb_night_mode.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                isNightMode=!isNightMode;
            }
        });

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.el_hearing_enhancement:
                Toast.makeText(this, "即将实现该功能，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_message:
                Toast.makeText(this, "该功能还未开发，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_celve:
                Toast.makeText(this, "该功能还未开发，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_training_camp:
                Toast.makeText(this, "该功能还未开发，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_collect:
                Toast.makeText(this, "该功能还未开发，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_discount:
                Toast.makeText(this, "该功能还未开发，敬请期待", Toast.LENGTH_SHORT).show();
                break;
            case R.id.ll_calendar:
                Toast.makeText(this, "即将实现该功能", Toast.LENGTH_SHORT).show();
                break;
            case R.id.el_about_us:
                startActivity(new Intent(this, AboutUsActivity.class));
                break;


        }
    }
}
